//
//  Global.swift
//
//  useful global methods and extension
//  Created by LYJ on 2019/9/20.
//  Copyright © 2019 LYJ. All rights reserved.
//

import UIKit
//func isIPhone6PlusBigMode() -> Bool {
//    return UIScreen.mainScreen().currentMode?.size == CGSizeMake(1125, 2001)
//}

//设备状态栏的高度
func STATUS_BAR_HEIGHT() -> CGFloat {
    return UIApplication.shared.statusBarFrame.size.height }

/********页面属性************/

//MARK: -全局尺寸
let SCREEN_HEIGHT = UIScreen.main.bounds.size.height
let SCREEN_WIDTH = UIScreen.main.bounds.size.width

/* 导航栏高度 */
let kNavigationH = 64
/* 工具栏高度 */
let kTabBarHeight = 49


func isiPhoneX() ->Bool {
    let screenHeight = UIScreen.main.nativeBounds.size.height;
    if screenHeight == 2436 || screenHeight == 1792 || screenHeight == 2688 || screenHeight == 1624 {
        return true
    }
    return false
}

func WIDTH_PRO(X:CGFloat) -> CGFloat {
    if isiPhoneX()
    {
        return (X) * (SCREEN_WIDTH / 375);
    }
    return  (X) * (SCREEN_WIDTH / 375);
}
func HEIGHT_PRO(X:CGFloat) -> CGFloat {
    if isiPhoneX()
    {
        return (X) * (SCREEN_HEIGHT / 812);
    }
    return  (X) * (SCREEN_HEIGHT / 667);
}


